package com.nansu.controller;

import com.nansu.entity.Result;
import com.nansu.entity.Student;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

//@Controller
@RestController
@RequestMapping("/student")
public class MyController5 {


//    @PostMapping("/ajax")
////    @ResponseBody
//    public Result ajax(String name, String sex){
//        System.out.println(name);
//        System.out.println(sex);
//        return new Result(true,"成功！");
//    }


    @PostMapping("/ajax")
//    @ResponseBody
    public Result ajax(@RequestBody Student student){
        System.out.println(student);
        return new Result(true,"成功！");
    }

}
